<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Adicionar Atributo Tipo Requisito</title>

</head>
<body>
	<fieldset>
			<legend>Novo Atributo Tipo de Requisito</legend>
			
			<form:form modelAttribute="atributoTipoRequisito"  action="/requisiteworks/requisito/tipo/${tipoRequisito}/atributo/adicionar.do" method="POST">
				<table class="form">
					<tr>
						<td>
							<form:label path="nome" cssErrorClass="erro">Nome</form:label>
						</td>
						<td>
							<form:input path="nome" cssErrorClass="erro"/>
						</td>
						<td>
							<ul>
								<form:errors path="nome" cssClass="erro" element="li"></form:errors>
							</ul>
						</td>
					</tr>
					
					<tr>
						<td>
							<form:label path="obrigatorio" cssErrorClass="erro">Obrigatorio</form:label>
						</td>
						<td>
							<form:checkbox path="obrigatorio" cssErrorClass="erro"/>
						</td>
						<td>
							<ul>
								<form:errors path="obrigatorio" cssClass="erro" element="li"></form:errors>
							</ul>
						</td>
					</tr>
					<tr>
						<td>
							<form:label path="tipoDado" cssErrorClass="erro">Tipo de Dado: </form:label>
						</td>
						<td>
							<select name="tipoDado">								
								<c:forEach items="${tipoDadoList}" var="tipoDado">
									<option value="${tipoDado}">${tipoDado}</option>
								</c:forEach>
							</select>
						</td>
					</tr>
					
				</table>
				<button type="submit">Salvar</button>
			</form:form>
		</fieldset>
</body>
</html>